<script>
export default {
  name: "WorkOrderHistoryView",
  data() {
    return {
      quotationData: [
        {
          id: 0,
          quotationDate: '2024-01-05 16:29:56',
          items: [
            { name: '铜管', spec: 'KFRFIY', quantity: 1, price: 40 },
            { name: '铜管', spec: 'KFRFIY', quantity: 1, price: 40 },
            { name: '铜管', spec: 'KFRFIY', quantity: 2, price: 80 }
          ],
          laborCost: 200.00,
          otherCost: 0.00,
          note: '我是备注信息内容......',
          auditStatus: 1
        },
        {
          id: 1,
          quotationDate: '2024-01-01 16:29:56',
          items: [
            { name: '铜管', spec: 'KFRFIY', quantity: 1, price: 40 },
            { name: '铜管', spec: 'KFRFIY', quantity: 1, price: 40 },
            { name: '铜管', spec: 'KFRFIY', quantity: 2, price: 80 }
          ],
          laborCost: 200.00,
          otherCost: 0.00,
          note: '我是备注信息内容......',
          auditStatus: 2,
          rejectReason: '我是驳回理由内容......'
        }
      ]
    }
  },
  methods: {
    onBack() {
      this.$router.go(-1);
    }
  },
  created() {
  },
}
</script>

<template>
<div>
    <van-nav-bar
        title="历史报价"
        left-arrow
        @click-left="onBack"
        fixed
        display:block
    />

  <div>
    <p>无用信息</p>
  </div>

    <div v-for="quotation in quotationData" :key="quotationData.id"  style="margin-top: 20px;" >
      <p>报价日期：{{ quotation.quotationDate }}</p>
      <table border="1px" align="center">
        <tr>
          <th>配件名称</th>
          <th>规格型号</th>
          <th>领用数量</th>
          <th>合计价格</th>
        </tr>
          <tr v-for="item in quotation.items">
            <td>{{ item.name }}</td>
            <td>{{ item.spec }}</td>
            <td>{{ item.quantity }}</td>
            <td>{{ item.price }}</td>
          </tr>
      </table>
      <span>其他费用：{{ quotation.otherCost }}</span><span>   </span>
      <span>工人费用：{{ quotation.laborCost }}</span>
      <p>审核状态：{{ quotation.auditStatus==1?'已审批':'驳回' }}</p>
      <p>备注信息：{{ quotation.note }}</p>
      <p v-if="quotation.auditStatus==2">驳回原因：{{ quotation.rejectReason }}</p>
    </div>
  <van-button type="primary" size="large" @click="onBack">确认</van-button>
</div>
</template>

<style scoped>

</style>